package com.itheima.reggie.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.reggie.dto.OrdersDto;
import com.itheima.reggie.pojo.Orders;

public interface OrdersService extends IService<Orders> {

    /**
     * 查询用户最新订单和订单详情
     * @param curPage
     * @param pageSize
     * @param userId
     * @return
     */
    Page<OrdersDto> queryUserOrderByPage(Integer curPage, Integer pageSize, Long userId);

    /**
     * 查询用户订单后再查询已查询到的订单对应的详情
     * @param curPage
     * @param pageSize
     * @param userId
     * @return
     */
    Page<OrdersDto> queryUserOrderNestDetail(Integer curPage, Integer pageSize, Long userId);

    /**
     * 用户提交订单
     * @param ordersDto
     */
    void submitOrder(OrdersDto ordersDto);

    /**
     * 再来一单
     * @param id
     */
    void submitOrderAgain(Long id);
}
